#include <string>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <time.h>
#include <stdlib.h>
#include "name.h"
#include <unistd.h>

std::vector<std::string> firstnames;
std::vector<std::string> secondnames;

#define random(a,b) ((rand() % ((b)-(a)+1))+ (a))

const std::string xxx(void) {
    std::string firstname = "笑看你变狗";
    std::string secondname;
    srand((unsigned)time(NULL)); 
    if (!firstnames.empty()) {
        int index = random(0, int(firstnames.size()) - 1);
        firstname = firstnames.at(index);
    }
    if (!secondnames.empty()) {
        int index = random(0, int(secondnames.size()) - 1);
        secondname = secondnames.at(index);
    }
    else {
        static const char* str[10] = {"\u2605", "\u0024", "\u2693", "\u262F", "\u2618", "\u2739", "\u2731", "\u2734", "\u273B", "\u266B"};
        int index = random(0, 9);
        printf("%d/n", index);
        firstname += str[index];
    }
    return firstname + secondname;
}

const char* func() {
    static const char * ch = "asdf";
    return ch;
}

std::vector<int> test_vector() {
    return std::vector<int>();
}

int main(void)
{
    printf("%s\n", xxx().c_str());
    printf("%s\n", xxx().c_str());
    printf("%s\n", xxx().c_str());
    printf("%s\n", xxx().c_str());
    printf("%s\n", func());
    std::vector<int> array = test_vector();
    while(1) sleep(10);
    return 0;
}
